package com.qf.service.Impl;

import com.qf.mapper.XiadanMapper;
import com.qf.pojo.Fangxing;
import com.qf.pojo.Xiadan;
import com.qf.pojo.XiadanDTO;
import com.qf.service.XiadanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class XiadanServiceImpl implements XiadanService {
    @Autowired
    private XiadanMapper xiadanMapper;

    @Override
    public List<Xiadan> selectAllById(Integer id) {
        List<Xiadan> xiadans = xiadanMapper.selectAllById(id);
        return xiadans;
    }

    @Override
    public XiadanDTO selectXiadan(Fangxing fangxing) {
        XiadanDTO xiadanDTO1 = xiadanMapper.selectXiadan(fangxing);
        return xiadanDTO1;
    }

    @Override
    public void addXiadan(Xiadan xiadan) {
        xiadanMapper.addXiadan(xiadan);
    }

    @Override
    public List<Xiadan> selectAll() {
        List<Xiadan> xiadans = xiadanMapper.selectAll();
        return xiadans;
    }
}
